# 继承
# 父类
class Animal:
    def eat(self):
        print('吃')
    def drink(self):
        print('喝')
    def run(self):
        print('跑')
class Dog(Animal):  # 子类继承父类
    def bark(self):
        print('看家护院')
class JinMao(Dog):
    def slepp(self):
        print('睡觉')

# 创建对象
chenyaojin = JinMao()
chenyaojin.slepp()
chenyaojin.bark()
chenyaojin.drink()